Skip to content

Conversation

SuperSimpleDev
Copy link
Owner

No description provided.

@@ -7,7 +7,20 @@ loadProducts(renderProductsGrid);
function renderProductsGrid() {
let productsHTML = '';

products.forEach((product) => {
const url = new URL(window.location.href);
const search = url.searchParams.get('search');
Copy link

@antaugustol antaugustol Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are only using the search part of the url, we could do it like this:

  const url = new URLSearchParams(location.search)
  const search = url.get('search').toLowerCase()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants